{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Challenges"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- create b- tree index on the last and first name in the customers table\n",
    "- create a hash index on the product name in the products table"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Solution:\n",
    "\n",
    "-- B tree index\n",
    "\n",
    "`CREATE INDEX idx_last_name_first_name_customers\n",
    "ON customers (last_name, first_name);`\n",
    "\n",
    "-- Hash index\n",
    "\n",
    "`CREATE INDEX idx_product_name_products\n",
    "ON products USING hash(product_name);`"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
